<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/commons/taglibs.jsp"%>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-us">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrom=1">
	<meta http-equiv="Cache-Control" content="no-store"/>
	<meta http-equiv="Pragma" content="no-cache"/>
	<meta http-equiv="Expires" content="0"/>
 	<%@ include file="../base.jsp" %>
	<title>查看药品信息</title>
	
	<script type="text/javascript">
	    function subdata(){
	    	if($("span[id=number]").text()!="") return;
	         if(!$("#signupForm").form('validate')){
	            return false;
	        }else{
	        	$("#submitButton").attr("disabled","true").addClass("grayButton");
	            $("#signupForm").submit();
	        }
	    }
	    function checkNumber(id){
			$.ajax({
		 	   	  type:"post",
		 	   	  url:"${ctx}/input/checkNumber.do",
		 	   	  data:{number:$("input[id="+id+"]").val()},
		 	   	  success:function(data){
		 	   		  if(data=="NO"){
		 	   			$("span[id="+id+"]").text($("input[id="+id+"]").val()+"已经存在！");
		 	   		  }else{
		 	   			$("span[id="+id+"]").text("");
		 	   		  }
		 	   	  }
		 	});
		}
	  
	</script>
</head>
<body>
  <div class="con_wrap">
	  	<%@ include file="../head.jsp" %>
	     <div id="main">
	        <form id="signupForm" action="${ctx}/input/update.do" method="POST" autocomplete="off">
	        <dl class="section_wrap">
		         <dt> <h2>药品信息</h2></dt>
					<table class="form">
						<tbody>
							 <tr>
						    	<td class="tit"><span style="color: red"> * </span>编　号：</td>
								<td><input id="number" name="number" disabled="disabled" value="${medical.number}" onblur="checkNumber(this.id)"
									Class="easyui-validatebox txt w20" maxlength="100"
									data-options="required:true,validType:'length[0,100]'">
									<span style="color: red" id="number" ></span>
									<input type="hidden" name="id" id="id" value="${medical.id}" >
								</td> 
								
								<td class="tit"><span style="color: red"> * </span>名　称：</td>
							   	<td><input id="name" name="name"   value="${medical.name}"disabled="disabled"
									Class="easyui-validatebox txt w20" maxlength="100"
									data-options="required:true,validType:'length[0,100]'">
								</td>
							</tr>
							<tr>
								<td class="tit"><span style="color: red"> * </span>描　述：</td>
							   	<td> 
									<input type="text" id="description" name="description"   value="${medical.description}" 
									Class="easyui-validatebox txt w20" maxlength="100"disabled="disabled"
									data-options="required:true,validType:'length[0,100]'">
								</td>
				       		
								<td class="tit"><span style="color: red"> * </span>数　量：</td>
								<td>
									 <input type="text" id="amount" name="amount"  value="${medical.amount}" disabled="disabled"
									 Class="easyui-validatebox txt w20" maxlength="100"
									data-options="required:true,validType:'length[0,100]'">
								</td>
							</tr>
							<tr>			       		
								<td class="tit"><span style="color: red"> * </span>售　价：</td>
								<td>
									 <input type="text" id="price" name="price"  value="${medical.price}" disabled="disabled"
									 Class="easyui-validatebox txt w20" maxlength="100"
									data-options="required:true,validType:'length[0,100]'">
								</td>
								
								<td class="tit"><span style="color: red"> * </span>成本价：</td>
								<td>
									 <input type="text" id="cost" name="mcost"  value="${medical.mcost}" disabled="disabled"
									 Class="easyui-validatebox txt w20" maxlength="100"
									data-options="required:true,validType:'length[0,100]'">
								</td>
							</tr>
							<tr>			       		
								<td class="tit"><span style="color: red"> * </span>生产者：</td>
								<td>
									 <input type="text" id="producer" name="producer"  value="${medical.producer}" disabled="disabled"
									 Class="easyui-validatebox txt w20" maxlength="100"
									data-options="required:true,validType:'length[0,100]'">
								</td>
								
								<td class="tit"><span style="color: red"> * </span>过　期：</td>
								<td>
									<input type="text" disabled="disabled" class="datepicker w20" name="deadline" id="deadline" value="<fmt:formatDate value='${medical.deadline}' pattern="yyyy-MM-dd"/>"/>
								</td>
							</tr>
				 		</tbody>
					</table>
	      </dl>
	      <table width="100%" style="margin-top: 15px">
	          <tbody>
		           <tr class="bottom">
		               <td width="40%">&nbsp;</td>
		               <td align="right">
		                  
		           </tr>
	     	   </tbody>
	     </table>
	 </form>
	</div>
	<div style="height: 200px;">
</div>
	<div id="footer">
		<%@ include file="../footer.jsp" %>
	</div>
</div>
</body>
</html>	